// 统一配置ajax请求
$.ajaxPrefilter(function(options){
    options.url = 'http://www.liulongbin.top:3007' + options.url;
    options.complete = function(xhr){
        if(xhr.responseJSON.status === 1 && xhr.responseJSON.message == '身份认证失败！'){
            // 清除本地token
            localStorage.removeItem('token');
            // 跳转到登录页面
            location.href = '/login.html';
        }
    },
    options.headers = {
        Authorization:localStorage.getItem('token')
    }
});